package com.dabbo.starship.app.client;

import java.util.Date;

public class TickTimer implements Runnable {

	private StarShipMain mainApp;
	
	public TickTimer(StarShipMain mainApp) {
		this.mainApp = mainApp;
	}
	
	@Override
	public void run() {
		
		while(true) {
			try {
				Thread.sleep(250);
				mainApp.tick();
			} catch (Exception ex) {
				System.out.println(new Date() + " EXCEPTION in TICKER thread.");
				System.exit(1);
			}
			
		}
		
	}
	
	

}
